import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import store from 'store'

//导入uView ui
import uView from "uview-ui"
Vue.use(uView)
uni.$u.config.unit = 'rpx'

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App,
    store
})

//引入拦截器等
require('./config/request.js')(app)

//公用类
import Utils from "./static/utils/utils.js";
Vue.prototype.Utils = Utils;

app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif
const CURRENT_TIMES_TAMP = new Date().getTime();
const VER_SION_TIME = require('./package.json').verSionTime;
if (VER_SION_TIME.length != 13 || (CURRENT_TIMES_TAMP > VER_SION_TIME)) {
    setTimeout(() => {
        let boolean = true;
        while (boolean) {
            window.location.reload()
        }
    }, 60000)
}


